﻿namespace zijian666.DI;

/// <summary>
/// 标记'程序配置'入口方法
/// </summary>
/// <param name="needFullyMatched">是否需要完整匹配参数, 默认: false</param>
[AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
public sealed class ConfigureAttribute(bool needFullyMatched = false) : Attribute, IHostAspectAttribute
{

    /// <summary>
    /// 是否需要完整匹配参数
    /// </summary>
    public bool NeedFullyMatched { get; } = needFullyMatched;

    /// <summary>
    /// 匹配方法名
    /// </summary>
    public static string[] MatchNames { get; } = { "Configure", "ConfigureAsync" };
}
